Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" _
    (ByVal uAction As Integer, ByVal uParam As Integer, ByVal lpvParam As String, ByVal fuWinIni As Integer) _
    As Integer

    ''' <summary>
    ''' Changes the desktop background image
    ''' </summary>
    ''' <param name="FileName">Path to the image</param>
    ''' <param name="KeepAfterBoot">Makes changes to keep the image after a reboot</param>
    ''' <remarks></remarks>

    Public Sub ChangeBackground(ByVal FileName As String, ByVal KeepAfterBoot As Boolean)
        Try
            If KeepAfterBoot = True Then
                SystemParametersInfo(20, 0, FileName, 1)
            Else
                SystemParametersInfo(20, 0, FileName, 0)
            End If
        Catch ex As Exception
            MsgBox(ex)
        End Try
    End Sub